﻿using BJ.AuthEntity.ViewModels;
using Syspetro.Core.AppDeal;
using Syspetro.Core.SysInterface;
using System.Threading.Tasks;

namespace BJ.AuthDomain.IService
{
    public interface IVerifyService : ITransientService
    {
        /// <summary>
        /// 获取短信验证(不需要登录)
        /// </summary>
        /// <returns></returns>
        SpActionResult<bool> Code_SMS(VM_Code_SMS code);
        /// <summary>
        /// 获取短信验证(需要登录)
        /// </summary>
        /// <returns></returns>
        Task<SpActionResult<bool>> Code_SMS();
        /// <summary>
        /// 获取邮箱验证(不需要登录)
        /// </summary>
        /// <returns></returns>
        SpActionResult<bool> Code_Email(VM_Code_Email code);
        /// <summary>
        /// 获取邮箱验证(需要登录)
        /// </summary>
        /// <returns></returns>
        Task<SpActionResult<bool>> Code_Email();
        /// <summary>
        /// 验证码校验手机
        /// </summary>
        /// <param name="phone"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<SpActionResult<bool>> VerifySMS(string phone, string code);
        /// <summary>
        /// 验证码校验邮箱
        /// </summary>
        /// <param name="email"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<SpActionResult<bool>> VerifyEmail(string email, string code);
        /// <summary>
        /// 绑定手机
        /// </summary>
        /// <param name="phone"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<SpActionResult<bool>> BindSMS(string phone, string code);
        /// <summary>
        /// 绑定邮箱
        /// </summary>
        /// <param name="email"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<SpActionResult<bool>> BindEmail(string email, string code);

        /// <summary>
        /// 是否设置了手机号
        /// </summary>
        /// <returns></returns>
        Task<bool> IsSetSMS();
        /// <summary>
        /// 是否设置了邮箱
        /// </summary>
        /// <returns></returns>
        Task<bool> IsSetEmail();
        /// <summary>
        /// 是否绑定了Google认证
        /// </summary>
        /// <returns></returns>
        Task<bool> IsSetGoogle();
    }
}
